<template>
  <div>
    <el-card class="box-card" shadow="never">
      <div slot="header" class="clearfix" ref="form" :model="chabuForm">
        <el-row>
  <el-col :span="2"><span>查询客户</span></el-col>
</el-row>
      </div>
      <div>
        <el-form size="mini">
          <el-row>
            <el-col :span="4">
              <span>生产部门</span>
            </el-col>
            <el-col :span="4">
              <el-select v-model="chabuForm.shengbu" size="mini">
                <el-option label="经理办公室" value="1"></el-option>
                <el-option label="特务二部" value="2"></el-option>
                <el-option label="研发部" value="3"></el-option>
                <el-option label="结构部" value="4"></el-option>
                <el-option label="西安分公司" value="4"></el-option>
                <el-option label="测试部" value="4"></el-option>
              </el-select>
            </el-col>
            <el-col :span="4">
              <span>年份</span>
            </el-col>
            <el-col :span="4">
              <el-input v-model="chabuForm.createTime" size="mini"></el-input>
            </el-col>
            <el-col :span="4">
              <span>客户名称</span>
            </el-col>
            <el-col :span="4">
              <el-input v-model="chabuForm.customerName" size="mini"></el-input>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="2">
              <span>录入时间</span>
            </el-col>
            <el-col :span="6">
              <el-date-picker v-model="chabuForm.beginTime" type="date" placeholder="开始日期" size="mini" style="width: 120px;"></el-date-picker>
              —
              <el-date-picker v-model="chabuForm.endTime" type="date" placeholder="结束日期" size="mini" style="width: 120px;"></el-date-picker>
            </el-col>
            <el-col :span="4">
              <span>客户编号</span>
            </el-col>
            <el-col :span="4">
              <el-input v-model="chabuForm.customerSerialNum" size="mini"></el-input>
            </el-col>
            <el-col :span="4">
              <span>联系人</span>
            </el-col>
            <el-col :span="4">
              <el-input v-model="chabuForm.linkman" size="mini"></el-input>
            </el-col>
          </el-row>
          <br>
          <el-button type="mini" @click="submitForm()">立即创建</el-button>
        </el-form>
      </div>
    </el-card>
    <br>
    <el-card class="box-card" shadow="never">
      <div slot="header" class="clearfix" ref="form" :model="chabuForm">
        <el-row>
  <el-col :span="2"><span>客户列表信息</span></el-col>
</el-row>
        
      </div>
      <div>
        <el-table :data="kehuData" border style="width: 100%">
          <el-table-column fixed prop="customerId" label="序号" ></el-table-column>
          <el-table-column prop="dustomerSerialNum" label="客户编号" ></el-table-column>
          <el-table-column prop="customerName" label="客户名称"></el-table-column>
          <el-table-column prop="linkman" label="联系人" ></el-table-column>
          <el-table-column prop="comparyTel" label="联系电话" ></el-table-column>
          <el-table-column prop="companyAddress" label="公司地址" ></el-table-column>
          <el-table-column prop="postalCode" label="邮政编码" ></el-table-column>
          <el-table-column prop="faxNumber" label="传真号" ></el-table-column>
          <el-table-column prop="customerReferred" label="客户简称" ></el-table-column>
          <el-table-column prop="englishName" label="客户英文名" ></el-table-column>
          <el-table-column prop="cooperation" label="是否合作" ></el-table-column>
          <el-table-column prop="所在国家" label="所在国家" ></el-table-column>
          <el-table-column prop="provinceId" label="所在省份" ></el-table-column>
          <el-table-column prop="cityId" label="所在城市" ></el-table-column>
          <el-table-column prop="typeId" label="客户类型" ></el-table-column>
          <el-table-column prop="industryId" label="所属行业" ></el-table-column>
          <el-table-column prop="embranchment" label="分支机构" ></el-table-column>
          <el-table-column prop="email" label="邮箱" ></el-table-column>
          <el-table-column prop="homePage" label="公司主页" ></el-table-column>
          <el-table-column prop="relationTime" label="关系建立时间" ></el-table-column>
          <el-table-column prop="relationDepartment" label="关系部门" ></el-table-column>
          <el-table-column prop="creditRatingsId" label="信用级别" ></el-table-column>
          <el-table-column prop="intimacyId" label="亲密度" ></el-table-column>
          <el-table-column prop="bankName" label="开户银行名称" ></el-table-column>
          <el-table-column prop="member" label="法定代表" ></el-table-column>
          <el-table-column prop="taxpayerCode" label="纳税人识别号" ></el-table-column>
          <el-table-column prop="remark" label="备注" ></el-table-column>
          <el-table-column prop="createName" label="录入人" ></el-table-column>
          <el-table-column prop="createTime" label="录入时间" ></el-table-column>
          <el-table-column fixed="right" label="操作" width="90">
            <template slot-scope="scope">
              <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
              <el-button type="text" size="small">编辑</el-button>
            </template>
          </el-table-column>
        </el-table>
            <el-pagination
      @size-change="shujuxian"
      @current-change="shujuxian"
      :current-page.sync="pageIndex"
      :page-sizes="[3, 5, 7, 9]"
      :page-size.sync="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="4">
    </el-pagination>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      chabuForm: {
        createTime: "",
        customerName: "",
        beginTime: "",
        endTime: "",
        customerSerialNum: "",
        linkman: ""
      },
      kehuData:[],
      pageIndex:1,
      pageSize:3,
      totalCount:0,
    };

  },
    created() {
    //  this.loginUserName = this.$cookieTools.getLoginUser().user_name;
    this.shujuxian();
  },
  methods: {
      shujuxian(){

        
          this.$myaxios("CustomerInput/CustomerPoInquire?pageIndex="+this.pageIndex+
          "&pageSize="+this.pageSize
          +"&createTime="+this.chabuForm.createTime
          +"&customerName="+this.chabuForm.customerName
          +"&beginTime="+this.chabuForm.beginTime
          +"&endTime="+this.chabuForm.endTime
          +"&customerSerialNum="+this.chabuForm.customerSerialNum
          +"&linkman="+this.chabuForm.linkman).then((r)=>{
            this.kehuData=r.data;
            // this.totalCount=r.data.data.length;
          })
      },
      submitForm(){
        this.shujuxian();
      }
  }
};
</script>

<style>
</style>